From 62e1b8798b3dbc07e466bc6318131a2b3443b95b Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 1 Feb 2010 14:03:06 +0000 Subject: [PATCH] hvm, s3: HVM guest RTCs become unsync'ed across host S3. Signed-off-by: Kamala Narasimhan --- xen/arch/x86/time.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 3b814964b3..29c8659d24 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -906,6 +906,19 @@ void update_domain_wallclock_time(struct domain *d) spin_unlock(&wc_lock); } +static void update_domain_rtc(void) +{ + struct domain *d; + + rcu_read_lock(&domlist_read_lock); + + for_each_domain ( d ) + if ( is_hvm_domain(d) ) + rtc_update_clock(d); + + rcu_read_unlock(&domlist_read_lock); +} + void domain_set_time_offset(struct domain *d, int32_t time_offset_seconds) { d->time_offset_seconds = time_offset_seconds; @@ -1535,6 +1548,8 @@ int time_resume(void) update_vcpu_system_time(current); + update_domain_rtc(); + return 0; } -- 2.30.2